package edu.sctu.zhangwang.month201505.day20150526;

import java.util.HashMap;

/**
 * Created by Administrator on 2015/5/26 0026.
 */
public class SetDataMap {
    public HashMap<Integer,String> seadMap(){
        HashMap<Integer,String> Map = new HashMap<Integer,String>();
        Map.put(1,"姓名：小张。年龄：12");
        Map.put(2,"姓名：小王。年龄：18");
        Map.put(3,"姓名：小李。年龄：16");
        Map.put(4,"姓名：小红。年龄：17");
        Map.put(5,"姓名：小明。年龄：15");

        return Map;
    }
    public HashMap<Integer,People> seadMap1(int size){
        HashMap<Integer,People> Map = new HashMap<Integer,People>();
        People people = new People();
        people.setName("小红");
        people.setNumber("10021");
        for (int i = 1;i<=size;i++) {
            Map.put(i,people);
        }

        return Map;
    }
//    public void outMap1(int size){
//        HashMap<Integer,String> map1 = seadMap1();
//        for (int i = 1;i<= map1.size();i++){
//            System.out.println(map1.get(i));
//        }
//    }
    public void outMap(){
        HashMap<Integer,String> map1 = seadMap();
        for (int i = 1;i<= map1.size();i++){
            System.out.println(map1.get(i));
        }
    }
    public static void main(String[] args) {
        SetDataMap setDataMap = new SetDataMap();
        setDataMap.outMap();
    }
}
